-- GENERATED SPELL FOR [Warlord Zol'Maz] --


function spell0_28902(pUnit, Event) --@Charge,n/a--
pUnit:FullCastSpellOnTarget(32323,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28902', 2305, 1)
end

function spell1_28902(pUnit, Event) --@Decapitate,Self--
pUnit:FullCastSpellOnTarget(54670,pUnit)
pUnit:RegisterEvent('Sorts_28902', 3000, 1)
end

function spell2_28902(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_28902', 581, 1)
end

function spell3_28902(pUnit, Event) --@Retaliation,Self--
pUnit:FullCastSpellOnTarget(40546,pUnit)
pUnit:RegisterEvent('Sorts_28902', 5267, 1)
end

function Sorts_28902(pUnit, Event)
local choix_sorts_28902 = math.random(0, 3)
if choix_sorts_28902 == 0 then
pUnit:RegisterEvent('spell0_28902', 1, 1)
end
if choix_sorts_28902 == 1 then
pUnit:RegisterEvent('spell1_28902', 1, 1)
end
if choix_sorts_28902 == 2 then
pUnit:RegisterEvent('spell2_28902', 1, 1)
end
if choix_sorts_28902 == 3 then
pUnit:RegisterEvent('spell3_28902', 1, 1)
end
end

function mob28902_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28902', math.random(1500, 3000), 1)
end

function mob28902_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28902_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28902_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28902, 1, 'mob28902_Action')
RegisterUnitEvent(28902, 2, 'mob28902_Leave')
RegisterUnitEvent(28902, 3, 'mob28902_Kill')
RegisterUnitEvent(28902, 4, 'mob28902_Die')
